From 05fbd32c4d22aee569786d916131af3d10f63542 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 12 Dec 2017 22:18:19 -0500 Subject: [PATCH] button: Add private api to get at the gesture Attaching another gesture from the outside does not work currently, so let widgets share their button's gesture for now. --- gtk/gtkbutton.c | 8 ++++++++ gtk/gtkbuttonprivate.h | 1 + 2 files changed, 9 insertions(+) diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 99bca66ec5..b89ac609d1 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -1146,3 +1146,11 @@ gtk_button_get_icon_name (GtkButton *button) return NULL; } + +GtkGesture * +gtk_button_get_gesture (GtkButton *button) +{ + GtkButtonPrivate *priv = gtk_button_get_instance_private (button); + + return priv->gesture; +} diff --git a/gtk/gtkbuttonprivate.h b/gtk/gtkbuttonprivate.h index ebb8ec6cb3..b0f79fc07b 100644 --- a/gtk/gtkbuttonprivate.h +++ b/gtk/gtkbuttonprivate.h @@ -41,6 +41,7 @@ struct _GtkButtonPrivate guint child_type : 2; }; +GtkGesture * gtk_button_get_gesture (GtkButton *button); G_END_DECLS -- 2.30.2